package com.ds.robot.assistant.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * 项目信息表
 *
 * @author WeiShaoying
 */
@Data
@TableName("project_info")
public class ProjectInfoEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	private Integer id;
	/**
	 * 云效项目ID
	 */
	private String spaceId;
	/**
	 * 项目名称
	 */
	private String name;
	/**
	 * 项目范围
	 */
	private String scope;
	/**
	 * 缺陷链接地址
	 */
	private String bugUrl;
	/**
	 * 需求链接地址
	 */
	private String reqUrl;
	/**
	 * 备注
	 */
	private String description;
	/**
	 * 创建时间
	 */
	private Date createdAt;
	/**
	 * 修改时间
	 */
	private Date updatedAt;


	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		ProjectInfoEntity that = (ProjectInfoEntity) o;
		return spaceId.equals(that.spaceId) &&
				name.equals(that.name) &&
				scope.equals(that.scope) &&
				description.equals(that.description);
	}

	@Override
	public int hashCode() {
		return Objects.hash(spaceId, name, scope, description);
	}

}
